﻿<navigation:Page xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"   x:Class="AR.Views.Parametrage.GestionEntretienTechniqueView"
             xmlns:viewmodel ="clr-namespace:AR.ViewModel.Parametrage"
             xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:ct="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
             xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
             xmlns:ignore="http://www.ignore.com"
             xmlns:layout="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras"
             xmlns:behaviors="clr-namespace:Behavior"
             mc:Ignorable="d ignore">

    <navigation:Page.Resources>
        <viewmodel:GestionEntretienTechniqueViewModel x:Key="viewModel"/>
    </navigation:Page.Resources>

    <Grid DataContext="{Binding Source={StaticResource viewModel}}" Width="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="900"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <ct:Label Grid.Row="0" HorizontalContentAlignment="Center" Background="Black" Foreground="Red" FontSize="16" 
              Content="{Binding ErrorMessage, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />

        <sdk:TabControl  Grid.Row="1">

            <sdk:TabItem Header="Thèmes/Questions/Choix" Name="tabThemeQuestion">
                <Grid DataContext="{Binding Source={StaticResource viewModel}}" Width="Auto" 
                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="550"/>
                        <ColumnDefinition Width="165"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="180"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="200"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="200"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0" Text="Gestion des Thèmes"/>
                    <Grid Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0"  Text="{Binding ThemeIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" 
                                 TextAlignment="Center" MaxLength="50" Grid.ColumnSpan="2"/>
                        <ListBox  Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Visible" 
                                  ItemsSource="{Binding Themes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  
                                  DisplayMemberPath="THEME_INTITULE"  Width="550" Height="160"
                 SelectedValuePath="ID_THEME" SelectedItem="{Binding Theme,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                 SelectedValue="{Binding Theme.ID_THEME, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Grid.ColumnSpan="2">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0"  VerticalAlignment="Top" Width="150" Command="{Binding majThemeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier thème"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutThemeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouveau thème"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeThemeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer thème"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="1" Grid.ColumnSpan="3">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock Grid.Row="2"  Grid.Column="0" Text="Gestion des Questions" />
                    <Grid   Grid.Row="2"  Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox  Height="60" AcceptsReturn="true"  Grid.Row="0" Text="{Binding QuestionIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="300"  Grid.ColumnSpan="2"/>
                        <ListBox Grid.Row="1"  Width="550" Height="140" ScrollViewer.VerticalScrollBarVisibility="Visible" ItemsSource="{Binding Theme.QUESTIONS, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="QUESTION" 
                            SelectedValuePath="ID_QUESTION" SelectedItem="{Binding Question, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                            SelectedValue="{Binding Question.ID_QUESTION, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majQuestionCommand}" >
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier question"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutQuestionCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouvelle question"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeQuestionCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer question"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>


                    <Rectangle Grid.Row="3" Grid.ColumnSpan="3">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock  Grid.Row="4" Grid.Column="0" Text="Gestion des Choix" />
                    <Grid Grid.Row="4"  Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="35"/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <CheckBox Grid.Row="0" Grid.Column="0" Margin="10,0,0,0" IsChecked="{Binding IsChoixCorrect,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" RenderTransformOrigin="4.513,0.573" />
                        <TextBox  Height="60"  AcceptsReturn="true" Grid.Row="0" Grid.Column="1" MinWidth="100"  Text="{Binding ChoixIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="300"/>
                        <ListBox Grid.ColumnSpan="2" Grid.Row="1" Grid.Column="0"    Width="550" Height="140" ScrollViewer.VerticalScrollBarVisibility="Visible" 
                                 ItemsSource="{Binding Question.CHOIX, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="CHOIX1" 
                                SelectedValuePath="IDCHOIX" SelectedItem="{Binding Choix, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                 SelectedValue="{Binding Choix.IDCHOIX, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Row="4" Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding majChoixCommand}" >
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier choix"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding ajoutChoixCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouveau choix"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="3" VerticalAlignment="Top" Width="150" Command="{Binding supprimeChoixCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer choix"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                </Grid>
            </sdk:TabItem>

            <sdk:TabItem Header="Practices/Tests/Thèmes" Name="tabThemeTests">
                <Grid DataContext="{Binding Source={StaticResource viewModel}}" Width="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="550"/>
                        <ColumnDefinition Width="165"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="180"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="180"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="180"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0"  Text="Gestion des Practices" Grid.ColumnSpan="2"></TextBlock>
                    <Grid Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0" Text="{Binding PracticeIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="50"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Practices,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="PRACTICE1" 
                            SelectedValuePath="ID_PRACTICE" SelectedItem="{Binding Practice,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                 Width="550" Height="160" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding Practice.ID_PRACTICE, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majPracticeCommand}" >
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier practice"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutPracticeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouvelle practice"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimePracticeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer practice"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="1" Grid.ColumnSpan="4">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock  Grid.Row="2" Grid.Column="0"  Text="Gestion des Tests" Grid.ColumnSpan="2"></TextBlock>
                    <Grid  Grid.Row="2" Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0" Text="{Binding TestIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="50"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Practice.TEST_TECHNIQUE,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="TEST_INTITULE" 
                            SelectedValuePath="ID_TEST" SelectedItem="{Binding Test,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                   Width="550" Height="160" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding Test.ID_TEST, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid  Grid.Row="2" Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majTestCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier test" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutTestCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouveau test"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeTestCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer test"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="3" Grid.ColumnSpan="4">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock  Grid.Row="4" Grid.Column="0"  Text="Gestion Thèmes/Test" Grid.ColumnSpan="2"></TextBlock>
                    <Grid Grid.Row="4" Grid.Column="1" Width="Auto"  Grid.ColumnSpan="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" Command="{Binding supprimeThemeTestCommand}" >
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Enlever" />
                                    <Image Source="../../Assets/icons/Arrow_Icon_16.png" Width="16" Height="16" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <ct:Label HorizontalAlignment="Center" Grid.Row="0" Grid.Column="0" Content="Thèmes du Test Technique séléctionné"></ct:Label>
                        <toolkit:ListBoxDragDropTarget  Grid.Row="1" Grid.Column="0"  Grid.RowSpan="2"  AllowDrop="true" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" >
                        <i:Interaction.Triggers>
                            <i:EventTrigger EventName="Drop">
                                    <i:InvokeCommandAction Command="{Binding ajoutThemeTestCommand, Mode=OneWay}"/>
                            </i:EventTrigger>
                        </i:Interaction.Triggers>
                            <ListBox Background="AliceBlue" ItemsSource="{Binding Test.THEMES__TEST_TECHNIQUE, Mode=TwoWay}"  DisplayMemberPath="THEME.THEME_INTITULE" 
                            SelectedValuePath="THEME.ID_THEME" SelectedItem="{Binding ThemeTest, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                 Width="320" Height="160" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding ThemeTest.ID_THEME, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                            <i:Interaction.Behaviors>
                                <behaviors:DoubleClickBehavior
                			DoubleClickCommand="{Binding supprimeThemeTestCommand}"/>
                            </i:Interaction.Behaviors>
                        </ListBox>
                        </toolkit:ListBoxDragDropTarget>
                        <Button Grid.Row="3" Grid.Column="1" VerticalAlignment="Top" Command="{Binding ajoutThemeTestCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Alarm_Arrow_Left_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Ajouter" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <ct:Label HorizontalAlignment="Center" Grid.Row="0" Grid.Column="2" Content="Liste des thèmes disponibles"></ct:Label>
                        <toolkit:ListBoxDragDropTarget  Grid.Row="1" Grid.Column="2" Grid.RowSpan="2"  AllowDrop="true" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                            <i:Interaction.Triggers>
                                <i:EventTrigger EventName="Drop">
                                    <i:InvokeCommandAction Command="{Binding supprimeThemeTestCommand, Mode=OneWay}"/>
                                </i:EventTrigger>
                            </i:Interaction.Triggers>
                            <ListBox  Background="AliceBlue" ItemsSource="{Binding ThemesToTest,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="THEME_INTITULE" 
                        SelectedValuePath="ID_THEME" SelectedItem="{Binding ThemeToTest,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                 Width="320" Height="160" ScrollViewer.VerticalScrollBarVisibility="Visible"
                        SelectedValue="{Binding ThemeToTest.ID_THEME, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                                <i:Interaction.Behaviors>
                                    <behaviors:DoubleClickBehavior
                			DoubleClickCommand="{Binding ajoutThemeTestCommand}"/>
                                </i:Interaction.Behaviors>
                            </ListBox>
                        </toolkit:ListBoxDragDropTarget>
                    </Grid>

                </Grid>
            </sdk:TabItem>

            <sdk:TabItem Header="Général" Name="tabReste">
                <Grid DataContext="{Binding Source={StaticResource viewModel}}"  Width="Auto">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="550"/>
                        <ColumnDefinition Width="165"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="140"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="140"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="140"/>
                        <RowDefinition MinHeight="15"/>
                        <RowDefinition Height="140"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Column="0"  Text="Gestion Niveaux d'étude"></TextBlock>
                    <Grid Grid.Column="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0" Text="{Binding EtudeIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="100"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Etudes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="INTITULE" 
                     SelectedValuePath="ID_ETUDE" SelectedItem="{Binding Etude,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                 Width="550" Height="120" ScrollViewer.VerticalScrollBarVisibility="Visible"
                     SelectedValue="{Binding Etude.ID_ETUDE, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majEtudeCommand}" >
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier niveau" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutEtudeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Ajouter niveau"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeEtudeCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer niveau"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="1" Grid.ColumnSpan="3">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock Grid.Column="0" Grid.Row="2"  Text="Niveaux d'expérience"></TextBlock>
                    <Grid Grid.Column="1" Grid.Row="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0" Text="{Binding ExperienceIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="100"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Experiences,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="INTITULE" 
                            SelectedValuePath="ID_EXPERIENCE" SelectedItem="{Binding Experience,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                  Width="550" Height="120" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding Experience.ID_EXPERIENCE, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Grid.Row="2" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majExperienceCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier niveau" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutExperienceCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Ajouter niveau"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeExperienceCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer niveau"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="3" Grid.ColumnSpan="3">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock Grid.Column="0" Grid.Row="4"  Text="Gestion des Projets"></TextBlock>
                    <Grid Grid.Column="1" Grid.Row="4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0"  Text="{Binding ProjetIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="50"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Projets,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="PROJET1" 
                            SelectedValuePath="IDPROJET" SelectedItem="{Binding Projet,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                  Width="550" Height="120" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding Projet.IDPROJET, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Grid.Row="4" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majProjetCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier projet" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutProjetCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouveau projet"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimeProjetCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer projet"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>

                    <Rectangle Grid.Row="5" Grid.ColumnSpan="3">
                        <Rectangle.Fill>
                            <LinearGradientBrush StartPoint="0.5,0.5" EndPoint="1.0,0.5" >
                                <GradientStop Color="#0066A1" Offset="0" />
                                <GradientStop Color="White" Offset="1.0" />
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>

                    <TextBlock Grid.Column="0" Grid.Row="6"  Text="Gestion des Postes"></TextBlock>
                    <Grid Grid.Column="1" Grid.Row="6">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <TextBox Grid.Row="0"  Text="{Binding PosteIntitulee,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" TextAlignment="Center" MaxLength="50"/>
                        <ListBox Grid.Row="1" ItemsSource="{Binding Postes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"  DisplayMemberPath="POST" 
                            SelectedValuePath="IDPOSTE" SelectedItem="{Binding Poste,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                  Width="550" Height="120" ScrollViewer.VerticalScrollBarVisibility="Visible"
                            SelectedValue="{Binding Poste.IDPOSTE, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        </ListBox>
                    </Grid>
                    <Grid Grid.Column="2" Grid.Row="6" Width="Auto">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="170"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                            <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Button Grid.Row="0" VerticalAlignment="Top" Width="150" Command="{Binding majPosteCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Ok_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Modifier poste" />
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="1" VerticalAlignment="Top" Width="150" Command="{Binding ajoutPosteCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Sign_Add_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Nouveau poste"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                        <Button Grid.Row="2" VerticalAlignment="Top" Width="150" Command="{Binding supprimePosteCommand}">
                            <Button.Content>
                                <StackPanel Orientation="Horizontal">
                                    <Image Source="../../Assets/icons/Delete_Icon_16.png" Width="16" Height="16" />
                                    <TextBlock Text="Supprimer poste"/>
                                </StackPanel>
                            </Button.Content>
                        </Button>
                    </Grid>
                </Grid>
            </sdk:TabItem>

        </sdk:TabControl>

        <HyperlinkButton Grid.Row="2" Height="55" Style="{StaticResource ButtonStyle}"  TargetName="ContentFrame"  NavigateUri="/ListeCandidats" Foreground="#0066A1">
            <HyperlinkButton.Content>
                <StackPanel Orientation="Horizontal">
                    <Image Source="../../Assets/icons/Arrow-Back.png" Width="30" Height="30"/>
                    <Border Width="10" />
                    <TextBlock Text="Retour à la page précédente" HorizontalAlignment="Center" VerticalAlignment="Center" />
                </StackPanel>
            </HyperlinkButton.Content>
        </HyperlinkButton>

    </Grid>
</navigation:Page>

